fix(a11y): move the focus to the content after a change of page #195
+119
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Part of the peer feedback (#167): the focus is not moved to the content when going to another page, after "Load more" it ends on the body, and the sort menu seemed to stay open after a choice with the keyboard.
I checked each point first:
FocusOnNavigateinsrc/App.tsxputs the focus on#main-content(the skip link target) when the path changes. A change of the search, filters or sort is not a new page, and nothing moves on the first load.Checked
FocusOnNavigate(it moves after a change of page, not after a change of the search). I broke the code on purpose to see the first one fail.e2e/focus.e2e.ts(2 tests) passes. All frontend tests,tsc, ESLint and Prettier are clean.Refs: #172 (the Load more part is left open, so this does not close it)
🤖 Generated with Claude Code